#pragma once
#include <ogre\Ogre.h>
#include <btBulletCollisionCommon.h>
#include <btBulletDynamicsCommon.h>
#include <BulletCollision\CollisionShapes\btHeightfieldTerrainShape.h>

#include "BulletObj.h"

class OBterrain
{
private:
	Ogre::SceneManager* mSceneMgr;
// 	Ogre::TerrainGroup* mTerrainGroup;
// 	Ogre::TerrainGlobalOptions* mTerrainGlobals;
	int mWorldSize, mTerrainSize;
	float mHeighScale;
	Ogre::Vector3 mTerrainPos;

	EntityWrapper* mTerrainEW;

	btCollisionShape* mTerrainShape;
	btDynamicsWorld* mWorld;
// 	Ogre::TerrainGlobalOptions* mTerrainGlobals;
// 	Ogre::TerrainGroup* mTerrainGroup;

	void SetupOgreTerrain();

public:
	OBterrain(Ogre::SceneManager* smgr, int worldsize, int terrainsize, 
		float hscale, btDynamicsWorld* bworld);
	~OBterrain(void);

	void Init();
};
